
package com.zhike.common.dto;

import lombok.Data;

/**
 * 群成员缓存信息对象类。
 * <p>
 * 本类当前仅用于高速缓存机制中。
 * 
 * @author Jack Jiang
 * @since 4.3
 */
@Data
public class GroupMember4Cache {
  /** 用户id */
  private String userUid;

  /** 群id */
  private String gId;

  /** 设备号 */
  private String deviceNo;

  private String name;

  private String userAvatarFileName;

  private Integer isAdmin;

  private Integer prohibitMsg;

  private Long msgTimeEnd;

  private String nicknameIngroup;

  public static GroupMember4Cache create(String uid, Integer isAdmin, Integer prohibitMsg, Long msgTimeEnd,
      String nicknameIngroup) {
    GroupMember4Cache gmc = new GroupMember4Cache();
    gmc.setUserUid(uid);
    gmc.setIsAdmin(isAdmin);
    gmc.setProhibitMsg(prohibitMsg);
    gmc.setMsgTimeEnd(msgTimeEnd);
    gmc.setNicknameIngroup(nicknameIngroup);
    return gmc;
  }
}
